<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>DHTML Tree samples. dhtmlXTree - XML loading events</title>
</head>
<style>
	body {font-size:12px}
	.{font-family:arial;font-size:12px}
	h1 {cursor:hand;font-size:16px;margin-left:10px;line-height:10px}
	xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
</style>
<body>
	<h1>XML loading events</h1>
	<link rel="STYLESHEET" type="text/css" href="../css/dhtmlXTree.css">
	<script  src="../js/dhtmlXCommon.js"></script>
	<script  src="../js/dhtmlXTree.js"></script>
    Open/close nodes or refresh tree (hardly detectable on fast connection)
	<table>
		<tr>
			<td valign="top">
				<div id="treeboxbox_tree" style="width:250; height:218;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"></div>
			</td>
			<td rowspan="2" style="padding-left:25" valign="top">
				
				<div style="display:none" id="b_1"><h1 style="color:red">Loading</h1></div>
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
	</table>
	<hr>	

	<script>
			function func_a(){
				document.getElementById("b_1").style.display="";
			}
			function func_b(){
                //timeout set for testing on local PC,where XML loaded quite fast
                window.setTimeout('document.getElementById("b_1").style.display="none"',300);
			}

			tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
			tree.setImagePath("../imgs/");
			tree.enableSmartXMLParsing(true);
			tree.setOnLoadingStart(func_a);
			tree.setOnLoadingEnd(func_b);
			tree.loadXML("tree.xml");


								
	</script>
<br><br>

</body>
</html>
